<?php

require_once realpath (dirname (__FILE__) . '//..//..//pages.php');
require_once CLASS_RECORD;

/**
 * Description of Supervisiona
 *
 * @author Andrea Cantafio
 */
class Supervisiona extends Record {

    public function __construct ($values) {
        $data = array ();
        if (is_array ($values)) {
            foreach ($values as $key => $value) {
                $add = true;
                switch ($key) {
                    case 'IDstudente':
                    case 'IDuser':
                        break;
                    case 'ID':
                        if (!isset ($this->values['IDuser'])) {
                            $key = 'IDuser';
                            break;
                        }
                    default:
                        $add = false;
                }
                if ($add) {
                    $data[$key] = $value;
                }
            }
        }
        $this->required = array ('IDstudente', 'IDuser');
        parent::__construct ('supervisiona', $data);
    }

}

?>
